<%-- 
    Document   : advertentieToevoegen
    Created on : May 29, 2012, 7:53:25 AM
    Author     : Johan
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<html>
    <body>
        <div class="post">

            <c:choose>
                <c:when test ="${advertentie.advId != null}">
                    <h2 class="title">Advertentie bewerken</h2>
                </c:when>
                <c:otherwise>
                    <h2 class="title">Advertentie toevoegen</h2>
                </c:otherwise>
            </c:choose>

            <div class="story">
                <form action="AdvertentieToevoegen" method= "get" enctype="multipart/form-data">
                    <input type="hidden" name="advId" value="${advertentie.advId}"/>
                    <table>                  
                        <tr>
                            <td>Advertentietekst</td>
                            <td><input type="text" name="advAltTekst" value="${advertentie.advAltTekst}"/></td>
                        </tr>
                        <tr>
                            <td>Advertentieplaatje</td>
                            <td><input type="file" name="advImage" accept="image/jpeg" value=""/></td>
                        </tr>
                        <tr>
                            <td>Website</td>
                            <td>http://<input type="text" name="webSite" value="${advertentie.advWebsite}"/></td>
                        </tr>
                        <tr>
                            <td>Tonen in</td>
                            <td>
                                <select name="state">
                                    <option value="${advertentie.advProvincie}" selected="selected">${advertentie.advProvincie}</option>
                                    <option value="Drenthe">Drenthe</option>
                                    <option value="Flevoland">Flevoland</option>
                                    <option value="Friesland">Friesland</option>
                                    <option value="Gelderland">Gelderland</option>
                                    <option value="Groningen">Groningen</option>
                                    <option value="Limburg">Limburg</option>
                                    <option value="Noord-Brabant">Noord-Brabant</option>
                                    <option value="Noord-Holland">Noord-Holland</option>
                                    <option value="Overijssel">Overijssel</option>
                                    <option value="Utrecht">Utrecht</option>
                                    <option value="Zeeland">Zeeland</option>
                                    <option value="Zuid-Holland">Zuid-Holland</option>
                                </select>                         
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <c:choose>
                                <c:when test ="${advertentie.advId != null}">
                                    <td><input type="submit" name="knop" value="Advertentie bijwerken"/></td>
                                </c:when>
                                <c:otherwise>
                                    <td><input type="submit" name="knop" value="Advertentie toevoegen"/></td>
                                </c:otherwise>
                            </c:choose>
                        </tr>
                    </table>
                </form>     
            </div>
        </div>
    </body>
</html>



